package org.elanfox.intellicommunity.intellicommunityadmin.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.elanfox.intellicommunity.biz.service.core.statistics.AlarmStatisticsService;
import org.elanfox.intellicommunity.common.constant.Constant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/7/23
 */
@Service
@Profile(Constant.PROFILE_DEV)
@Slf4j
public class TestScheduleService {
    @Autowired
    private AlarmStatisticsService alarmStatisticsService;

    @Scheduled(cron = "0 */1 * * * ?")
    public void convertTask() {
        System.out.println(LocalDateTime.now() + "--task starting");
    }
}
